package com.bootdo.common.task;

import com.alibaba.fastjson.JSON;
import com.bootdo.provider.domain.GoodsInfoDO;
import com.bootdo.provider.service.GoodsInfoService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
 * Created by clq on 2018/5/5
 */
public class MaterrialJob implements Job {
    @Autowired
    private GoodsInfoService goodsInfoService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {



        System.out.println(JSON.toJSON(goodsInfoService.get(1L)));

   //        throw new JobExecutionException("Testing Exception");
    }
}
